<?php

namespace IDock\Insurance\ZMBX\Request;

use Exception;
use IDock\Insurance\ZMBX\Request\AllZMBXRequest;
use IDock\Insurance\ZMBX\Response\RenewalInquiryResponse;
use IDock\Visitor\RenewalInquiryVisitor;

class RenewalInquiryRequest extends AllZMBXRequest
{
    protected $route = 'RenewalQuery.do';

    public $requestCode = 'RenewalQuery';

    protected $response = RenewalInquiryResponse::class;

    protected $urlTip = '续保查询';

    /*** @var  RenewalInquiryVisitor $visitor */
    protected $visitor;

    /**
     * @return array
     * @throws Exception
     */
    public function generate(): array
    {
        $this->setZMBXToken($this->visitor->argc);
        $param = [
            'plateNo' => $this->visitor->licenseNo ?? '',
            'engine' => $this->visitor->engineNo,//
            'VIN' => $this->visitor->vin,//
            'riskCode' => '0361',//
            'province' => '510000',//
        ];
        return $param;
    }
}
